package org.afei.ioc.bean;


import org.afei.ioc.annotation.Bean;
import org.afei.ioc.annotation.Param;
import org.afei.ioc.annotation.Service;

/**
 * @author afei
 * @date 17-5-25.
 */
@Bean(name = "person")
public class Person {
    @Bean(name = "car")
    private Car car;

    @Service(name = "ToSomeWhere")
    public String ToSomeWhere(@Param(name = "address") String address) {
        return car.DriveToSomeWhere(address);
    }

    @Service(name = "ToSomeWhere1")
    public String ToSomeWhere1(@Param(name = "address1") String address1) {
        return car.DriveToSomeWhere(address1);
    }

}
